<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:form id="formCadCot">
	<p:outputPanel style="margin-top: 30px;">
		<h:panelGrid columns="1" id="grid"
			style="margin-left: -178px;left: 50%;position: relative;">

			<h:outputLabel style="margin-left: 97px;"
				value="#{message.label_marca}">
				<p:inputText size="15" value="#{cotacaoTela.cotacao.marca}"
					required="true" style="margin-left: 5px;"
					requiredMessage="#{message.msg_obrigatorio}" />
			</h:outputLabel>

			<h:outputLabel style="margin-left: 74px;margin-top:5px;"
				value="#{message.label_valor_uni}">
				<p:inputText id="vlrUni" size="15"
					value="#{cotacaoTela.cotacao.valorUnitario}" required="true"
					style="margin-left: 5px;"
					requiredMessage="#{message.msg_obrigatorio}"
					converterMessage="#{message.msg_valor_invalido}">
					<f:convertNumber pattern="#,##0.00"></f:convertNumber>
					<p:ajax update="vlrUni" event="change" global="false"/>
				</p:inputText>
			</h:outputLabel>

			<p:commandButton icon="ui-icon-search" id="bPro1"
				onclick="dlgModalFormaPag.show()" type="button">
				<h:outputLabel value="#{message.label_forma_pag}"
					style="margin-top:5px;" />
				<p:inputText size="15" id="idFormPag"
					value="#{formaPagamentoModalPesquisaTela.forma.idFormaPag}"
					required="true" style="margin-left: 5px;"
					requiredMessage="#{message.msg_obrigatorio}"
					validator="#{cotacaoTela.validaFormaPag}">
					<p:ajax event="blur" update="idFormPag,:messages" process="@this"
						global="false" />
				</p:inputText>
			</p:commandButton>
			<p:tooltip for="bPro1" value="#{message.label_procurar}" />

			<h:outputLabel value="#{message.label_prazo}"
				style="margin-left: 26px;">
				<p:inputText size="15" value="#{cotacaoTela.cotacao.prazoEntrega}"
					required="true" style="margin-left: 5px;"
					requiredMessage="#{message.msg_obrigatorio}" />
			</h:outputLabel>
			<h:outputLabel>
				<h:outputLabel value="#{message.label_frete}"
					style="margin-top:5px; float: left; margin-left: 103px; padding-right: 5px;" />
				<p:selectOneMenu value="#{cotacaoTela.tipoFreteInput}">
					<f:selectItem itemLabel="CIF" itemValue="CIF" />
					<f:selectItem itemLabel="FOB" itemValue="FOB" />
				</p:selectOneMenu>
			</h:outputLabel>
			<h:outputLabel>
				<h:outputLabel value="#{message.label_observacao}"
					style="margin-top:40px; float: left; margin-left: 60px; padding-right: 5px;" />
				<p:inputTextarea id="obsCota" rows="6" cols="33"
					style="margin-top:1px;" value="#{cotacaoTela.cotacao.observacao}"
					required="true" requiredMessage="#{message.msg_obrigatorio}" />
			</h:outputLabel>
			<p:fileUpload label="#{message.botao_foto}"
				fileUploadListener="#{cotacaoTela.handleFileUpload}" mode="advanced"
				update=":messages" auto="true" sizeLimit="100000"
				style="padding-top:15px;" allowTypes="/(\.|\/)(jpe?g)$/" />
		</h:panelGrid>

		<div
			style="margin-left: -140px; left: 50%; position: relative; width: 240px;">
			<p:commandButton icon="ui-icon-disk" value="#{message.botao_salvar}"
				action="#{cotacaoTela.cotar}" update=":messages,@form"
				style="margin-top:25px; margin-left: 50px;">
			</p:commandButton>
			<p:commandButton icon="ui-icon-close"
				value="#{message.botao_cancelar}" type="button"
				onclick="dlgCota.hide()" style="margin-top:25px; margin-left: 15px;">
			</p:commandButton>
		</div>
	</p:outputPanel>

</h:form>
</html>